-- GENERATED SPELL FOR [Crazed Dragonhawk] --


function spell0_15650(pUnit, Event) --@Bite,n/a--
pUnit:FullCastSpellOnTarget(17255,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15650', 602, 1)
end

function spell1_15650(pUnit, Event) --@Cower,n/a--
pUnit:FullCastSpellOnTarget(1742,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15650', 0, 1)
end

function spell2_15650(pUnit, Event) --@Fire Breath,n/a--
pUnit:FullCastSpellOnTarget(34889,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15650', 2000, 1)
end

function spell3_15650(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(2649,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15650', 0, 1)
end

function spell4_15650(pUnit, Event) --@Growl,n/a--
pUnit:FullCastSpellOnTarget(14916,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15650', 0, 1)
end

function Sorts_15650(pUnit, Event)
local choix_sorts_15650 = math.random(0, 4)
if choix_sorts_15650 == 0 then
pUnit:RegisterEvent('spell0_15650', 1, 1)
end
if choix_sorts_15650 == 1 then
pUnit:RegisterEvent('spell1_15650', 1, 1)
end
if choix_sorts_15650 == 2 then
pUnit:RegisterEvent('spell2_15650', 1, 1)
end
if choix_sorts_15650 == 3 then
pUnit:RegisterEvent('spell3_15650', 1, 1)
end
if choix_sorts_15650 == 4 then
pUnit:RegisterEvent('spell4_15650', 1, 1)
end
end

function mob15650_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15650', math.random(1500, 3000), 1)
end

function mob15650_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15650_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15650_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15650, 1, 'mob15650_Action')
RegisterUnitEvent(15650, 2, 'mob15650_Leave')
RegisterUnitEvent(15650, 3, 'mob15650_Kill')
RegisterUnitEvent(15650, 4, 'mob15650_Die')
